Skip to content

feat(ui): show reserved resources in topology view#27846

Draft
sevensolutions wants to merge 3 commits intohashicorp:mainfrom
sevensolutions:feat/gh-10794
Draft

feat(ui): show reserved resources in topology view#27846
sevensolutions wants to merge 3 commits intohashicorp:mainfrom
sevensolutions:feat/gh-10794

Conversation

@sevensolutions
Copy link
Copy Markdown
Contributor

@sevensolutions sevensolutions commented Apr 17, 2026

Description

This PR shows reserved resources (CPU and Memory) of every node within the topology view and closes #10794.

Testing & Reproduction steps

Navigate to the Topology page eg. using the "topoSmall" mirage preset.
http://localhost:4200/ui/topology?mirage-scenario=topoSmall
You should see some nodes with orange bars at the end. It also has a tooltip showing the actual values.

Here is a screenshot:
image

Links

#10794

Contributor Checklist

  • Changelog Entry If this PR changes user-facing behavior, please generate and add a
    changelog entry using the make cl command.
  • Testing Please add tests to cover any new functionality or to demonstrate bug fixes and
    ensure regressions will be caught.
  • Documentation If the change impacts user-facing functionality such as the CLI, API, UI,
    and job configuration, please update the Nomad product documentation, which is stored in the
    web-unified-docs repo. Refer to the web-unified-docs contributor guide for docs guidelines.
    Please also consider whether the change requires notes within the upgrade
    guide
    . If you would like help with the docs, tag the nomad-docs team in this PR.

Reviewer Checklist

  • Backport Labels Please add the correct backport labels as described by the internal
    backporting document.
  • Commit Type Ensure the correct merge method is selected which should be "squash and merge"
    in the majority of situations. The main exceptions are long-lived feature branches or merges where
    history should be preserved.
  • Enterprise PRs If this is an enterprise only PR, please add any required changelog entry
    within the public repository.
  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

AI Disclosure

In this PR, i've used AI (Github Copilot CLI) for assistance. Mainly to understand the correct places and how Ember JS works. The tests have been written entirely by AI.
I've reviewed and understood every single line.

@sevensolutions
Copy link
Copy Markdown
Contributor Author

Strange... something seems to be broken with your linter config.
I have these two variables:

const cpuRemainder = {
      x: cpuOffset * width + 0.5,
      width: Math.max((1 - cpuReservedPercent) * width - cpuOffset * width, 0),
    };
const memoryRemainder = {
     x: memoryOffset * width + 0.5,
      width: Math.max(
        (1 - memoryReservedPercent) * width - memoryOffset * width,
        0
      ),
    };

For whatever reason they need to be exactly formatted like this (notice the line breaks in Math.max). When i try to format both in the same way, the linter is unhappy.

@sevensolutions sevensolutions marked this pull request as ready for review April 17, 2026 17:48
@sevensolutions sevensolutions requested review from a team as code owners April 17, 2026 17:48
@sevensolutions sevensolutions marked this pull request as draft May 5, 2026 18:37
@sevensolutions
Copy link
Copy Markdown
Contributor Author

I just saw this commit: bbc538e

I will rework this PR soon and resolve the conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

expose reserved resources on topology view

2 participants